package com.yehuo.app.controller;

import com.alibaba.druid.util.StringUtils;
import com.yehuo.app.entity.Page;
import com.yehuo.app.entity.dto.SelectOrderDto;
import com.yehuo.app.model.R;
import com.yehuo.app.model.Result;
import com.yehuo.app.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单控制器
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;
    /**
     * 查询订单列表
     * @param selectOrderDto
     * @return
     */
    @RequestMapping("/select")
    public R selectOrder(SelectOrderDto selectOrderDto){
        if(selectOrderDto == null){
            selectOrderDto = new SelectOrderDto();
        }
        return orderService.selectOrder(selectOrderDto);
    }


}
